package com.tao.friend.controller.user;

import com.tao.common.creo.constants.HttpConstants;
import com.tao.common.creo.controller.BaseController;
import com.tao.common.creo.domain.BaseEntity;
import com.tao.common.creo.domain.Result;
import com.tao.friend.domain.user.dto.UserExamDTO;
import com.tao.friend.manager.UserExamMapper;
import com.tao.friend.service.IUserExamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user/exam")
public class UserExamController extends BaseController {


    @Autowired
    IUserExamService userExamService;
    /**
     * 报名竞赛
     */
    @PostMapping("/enter")
    public Result<Integer> enter(@RequestBody UserExamDTO userExamDTO) {
        return Result.success(userExamService.enter(userExamDTO.getExamId()));
    }
}
